<?php
	include("cronDB.config.php");
	include($WEBSITE_DOCUMENT_ROOT."/Common/Identity/User.php");
	
	$sql = "delete from sessions where ((unix_timestamp(now()) - unix_timestamp(accessed))/60) >= 60";
	
	$DB->query($sql);
	
	writeLogMessage("All Old Sessions Deleted", $fileHandle);
	
	function writeLogMessage($message, $fileHandle) {
		$message = date("d-M-o H:i:s") . "   -   " . $message . "\r\n";
		print $message;
	}
?>